\(\int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx\) [352]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (warning: unable to verify)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 47 \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {b x \sqrt {-1+c x} \sqrt {1+c x}}{2 c^2}+\frac {\left (b+2 a c^2\right ) \text {arccosh}(c x)}{2 c^3} \]

[Out]

1/2*(2*a*c^2+b)*arccosh(c*x)/c^3+1/2*b*x*(c*x-1)^(1/2)*(c*x+1)^(1/2)/c^2

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {397, 54} \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\left (2 a c^2+b\right ) \text {arccosh}(c x)}{2 c^3}+\frac {b x \sqrt {c x-1} \sqrt {c x+1}}{2 c^2} \]

[In]

Int[(a + b*x^2)/(Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(b*x*Sqrt[-1 + c*x]*Sqrt[1 + c*x])/(2*c^2) + ((b + 2*a*c^2)*ArcCosh[c*x])/(2*c^3)

Rule 54

Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ArcCosh[b*(x/a)]/b, x] /; FreeQ[{a,
 b, c, d}, x] && EqQ[a + c, 0] && EqQ[b - d, 0] && GtQ[a, 0]

Rule 397

Int[((a1_) + (b1_.)*(x_)^(non2_.))^(p_.)*((a2_) + (b2_.)*(x_)^(non2_.))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symb
ol] :> Simp[d*x*(a1 + b1*x^(n/2))^(p + 1)*((a2 + b2*x^(n/2))^(p + 1)/(b1*b2*(n*(p + 1) + 1))), x] - Dist[(a1*a
2*d - b1*b2*c*(n*(p + 1) + 1))/(b1*b2*(n*(p + 1) + 1)), Int[(a1 + b1*x^(n/2))^p*(a2 + b2*x^(n/2))^p, x], x] /;
 FreeQ[{a1, b1, a2, b2, c, d, n, p}, x] && EqQ[non2, n/2] && EqQ[a2*b1 + a1*b2, 0] && NeQ[n*(p + 1) + 1, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {b x \sqrt {-1+c x} \sqrt {1+c x}}{2 c^2}-\frac {\left (-b-2 a c^2\right ) \int \frac {1}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx}{2 c^2} \\ & = \frac {b x \sqrt {-1+c x} \sqrt {1+c x}}{2 c^2}+\frac {\left (b+2 a c^2\right ) \cosh ^{-1}(c x)}{2 c^3} \\ \end{align*}

Mathematica [A] (warning: unable to verify)

Time = 0.17 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.23 \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {b c x \sqrt {-1+c x} \sqrt {1+c x}+2 \left (b+2 a c^2\right ) \text {arctanh}\left (\sqrt {\frac {-1+c x}{1+c x}}\right )}{2 c^3} \]

[In]

Integrate[(a + b*x^2)/(Sqrt[-1 + c*x]*Sqrt[1 + c*x]),x]

[Out]

(b*c*x*Sqrt[-1 + c*x]*Sqrt[1 + c*x] + 2*(b + 2*a*c^2)*ArcTanh[Sqrt[(-1 + c*x)/(1 + c*x)]])/(2*c^3)

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(90\) vs. \(2(39)=78\).

Time = 4.03 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.94

method result size
risch \(\frac {b x \sqrt {c x -1}\, \sqrt {c x +1}}{2 c^{2}}+\frac {\left (2 c^{2} a +b \right ) \ln \left (\frac {c^{2} x}{\sqrt {c^{2}}}+\sqrt {c^{2} x^{2}-1}\right ) \sqrt {\left (c x -1\right ) \left (c x +1\right )}}{2 c^{2} \sqrt {c^{2}}\, \sqrt {c x -1}\, \sqrt {c x +1}}\) \(91\)
default \(\frac {\sqrt {c x -1}\, \sqrt {c x +1}\, \left (\operatorname {csgn}\left (c \right ) c \sqrt {c^{2} x^{2}-1}\, b x +2 \ln \left (\left (\sqrt {c^{2} x^{2}-1}\, \operatorname {csgn}\left (c \right )+c x \right ) \operatorname {csgn}\left (c \right )\right ) a \,c^{2}+\ln \left (\left (\sqrt {c^{2} x^{2}-1}\, \operatorname {csgn}\left (c \right )+c x \right ) \operatorname {csgn}\left (c \right )\right ) b \right ) \operatorname {csgn}\left (c \right )}{2 c^{3} \sqrt {c^{2} x^{2}-1}}\) \(103\)

[In]

int((b*x^2+a)/(c*x-1)^(1/2)/(c*x+1)^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2*b*x*(c*x-1)^(1/2)*(c*x+1)^(1/2)/c^2+1/2*(2*a*c^2+b)/c^2*ln(c^2*x/(c^2)^(1/2)+(c^2*x^2-1)^(1/2))/(c^2)^(1/2
)*((c*x-1)*(c*x+1))^(1/2)/(c*x-1)^(1/2)/(c*x+1)^(1/2)

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.17 \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\sqrt {c x + 1} \sqrt {c x - 1} b c x - {\left (2 \, a c^{2} + b\right )} \log \left (-c x + \sqrt {c x + 1} \sqrt {c x - 1}\right )}{2 \, c^{3}} \]

[In]

integrate((b*x^2+a)/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="fricas")

[Out]

1/2*(sqrt(c*x + 1)*sqrt(c*x - 1)*b*c*x - (2*a*c^2 + b)*log(-c*x + sqrt(c*x + 1)*sqrt(c*x - 1)))/c^3

Sympy [F(-1)]

Timed out. \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\text {Timed out} \]

[In]

integrate((b*x**2+a)/(c*x-1)**(1/2)/(c*x+1)**(1/2),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.57 \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {a \log \left (2 \, c^{2} x + 2 \, \sqrt {c^{2} x^{2} - 1} c\right )}{c} + \frac {\sqrt {c^{2} x^{2} - 1} b x}{2 \, c^{2}} + \frac {b \log \left (2 \, c^{2} x + 2 \, \sqrt {c^{2} x^{2} - 1} c\right )}{2 \, c^{3}} \]

[In]

integrate((b*x^2+a)/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="maxima")

[Out]

a*log(2*c^2*x + 2*sqrt(c^2*x^2 - 1)*c)/c + 1/2*sqrt(c^2*x^2 - 1)*b*x/c^2 + 1/2*b*log(2*c^2*x + 2*sqrt(c^2*x^2
- 1)*c)/c^3

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.47 \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=\frac {\sqrt {c x + 1} \sqrt {c x - 1} {\left (\frac {{\left (c x + 1\right )} b}{c^{2}} - \frac {b}{c^{2}}\right )} - \frac {2 \, {\left (2 \, a c^{2} + b\right )} \log \left (\sqrt {c x + 1} - \sqrt {c x - 1}\right )}{c^{2}}}{2 \, c} \]

[In]

integrate((b*x^2+a)/(c*x-1)^(1/2)/(c*x+1)^(1/2),x, algorithm="giac")

[Out]

1/2*(sqrt(c*x + 1)*sqrt(c*x - 1)*((c*x + 1)*b/c^2 - b/c^2) - 2*(2*a*c^2 + b)*log(sqrt(c*x + 1) - sqrt(c*x - 1)
)/c^2)/c

Mupad [B] (verification not implemented)

Time = 17.42 (sec) , antiderivative size = 293, normalized size of antiderivative = 6.23 \[ \int \frac {a+b x^2}{\sqrt {-1+c x} \sqrt {1+c x}} \, dx=-\frac {\frac {14\,b\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {c\,x+1}-1\right )}^3}+\frac {14\,b\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^5}{{\left (\sqrt {c\,x+1}-1\right )}^5}+\frac {2\,b\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^7}{{\left (\sqrt {c\,x+1}-1\right )}^7}+\frac {2\,b\,\left (\sqrt {c\,x-1}-\mathrm {i}\right )}{\sqrt {c\,x+1}-1}}{c^3-\frac {4\,c^3\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {c\,x+1}-1\right )}^2}+\frac {6\,c^3\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {c\,x+1}-1\right )}^4}-\frac {4\,c^3\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {c\,x+1}-1\right )}^6}+\frac {c^3\,{\left (\sqrt {c\,x-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {c\,x+1}-1\right )}^8}}+\frac {2\,b\,\mathrm {atanh}\left (\frac {\sqrt {c\,x-1}-\mathrm {i}}{\sqrt {c\,x+1}-1}\right )}{c^3}-\frac {4\,a\,\mathrm {atan}\left (\frac {c\,\left (\sqrt {c\,x-1}-\mathrm {i}\right )}{\left (\sqrt {c\,x+1}-1\right )\,\sqrt {-c^2}}\right )}{\sqrt {-c^2}} \]

[In]

int((a + b*x^2)/((c*x - 1)^(1/2)*(c*x + 1)^(1/2)),x)

[Out]

(2*b*atanh(((c*x - 1)^(1/2) - 1i)/((c*x + 1)^(1/2) - 1)))/c^3 - ((14*b*((c*x - 1)^(1/2) - 1i)^3)/((c*x + 1)^(1
/2) - 1)^3 + (14*b*((c*x - 1)^(1/2) - 1i)^5)/((c*x + 1)^(1/2) - 1)^5 + (2*b*((c*x - 1)^(1/2) - 1i)^7)/((c*x +
1)^(1/2) - 1)^7 + (2*b*((c*x - 1)^(1/2) - 1i))/((c*x + 1)^(1/2) - 1))/(c^3 - (4*c^3*((c*x - 1)^(1/2) - 1i)^2)/
((c*x + 1)^(1/2) - 1)^2 + (6*c^3*((c*x - 1)^(1/2) - 1i)^4)/((c*x + 1)^(1/2) - 1)^4 - (4*c^3*((c*x - 1)^(1/2) -
 1i)^6)/((c*x + 1)^(1/2) - 1)^6 + (c^3*((c*x - 1)^(1/2) - 1i)^8)/((c*x + 1)^(1/2) - 1)^8) - (4*a*atan((c*((c*x
 - 1)^(1/2) - 1i))/(((c*x + 1)^(1/2) - 1)*(-c^2)^(1/2))))/(-c^2)^(1/2)